package com.ruoyi.process.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.process.mapper.ProcessSellrecordMapper;
import com.ruoyi.process.domain.ProcessSellrecord;
import com.ruoyi.process.service.IProcessSellrecordService;
import com.ruoyi.common.core.text.Convert;

/**
 * 销售记录Service业务层处理
 * 
 * @author chao
 * @date 2024-07-26
 */
@Service
public class ProcessSellrecordServiceImpl implements IProcessSellrecordService 
{
    @Autowired
    private ProcessSellrecordMapper processSellrecordMapper;

    /**
     * 查询销售记录
     * 
     * @param id 销售记录主键
     * @return 销售记录
     */
    @Override
    public ProcessSellrecord selectProcessSellrecordById(Long id)
    {
        return processSellrecordMapper.selectProcessSellrecordById(id);
    }

    /**
     * 查询销售记录列表
     * 
     * @param processSellrecord 销售记录
     * @return 销售记录
     */
    @Override
    public List<ProcessSellrecord> selectProcessSellrecordList(ProcessSellrecord processSellrecord)
    {
        return processSellrecordMapper.selectProcessSellrecordList(processSellrecord);
    }

    /**
     * 新增销售记录
     * 
     * @param processSellrecord 销售记录
     * @return 结果
     */
    @Override
    public int insertProcessSellrecord(ProcessSellrecord processSellrecord)
    {
        return processSellrecordMapper.insertProcessSellrecord(processSellrecord);
    }

    /**
     * 修改销售记录
     * 
     * @param processSellrecord 销售记录
     * @return 结果
     */
    @Override
    public int updateProcessSellrecord(ProcessSellrecord processSellrecord)
    {
        return processSellrecordMapper.updateProcessSellrecord(processSellrecord);
    }

    /**
     * 批量删除销售记录
     * 
     * @param ids 需要删除的销售记录主键
     * @return 结果
     */
    @Override
    public int deleteProcessSellrecordByIds(String ids)
    {
        return processSellrecordMapper.deleteProcessSellrecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除销售记录信息
     * 
     * @param id 销售记录主键
     * @return 结果
     */
    @Override
    public int deleteProcessSellrecordById(Long id)
    {
        return processSellrecordMapper.deleteProcessSellrecordById(id);
    }
}
